feat(cli): add atomic launch receipts - #1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f9ae3e454
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CREATE UNIQUE INDEX IF NOT EXISTS idx_runs_repo_branch_launch_nonce | ||
| ON runs (repo_id, branch, launch_nonce) | ||
| WHERE launch_nonce IS NOT NULL; |
There was a problem hiding this comment.
Create the nonce index only after adding its column
On every existing installation whose runs table predates this commit, db.Open executes schemaSQL before migrationStatements; CREATE TABLE IF NOT EXISTS leaves the old table unchanged, so this index statement fails with no such column: launch_nonce before the later ALTER TABLE can add it. That prevents the daemon and other database-opening commands from starting after an upgrade. Create the index only in the ordered migration, or otherwise add the column before executing this statement.
Useful? React with 👍 / 👎.
| if run == nil { | ||
| return &ipc.GetLaunchReceiptResult{}, nil | ||
| } | ||
| receipt, err := receiptForRun(run, false) |
There was a problem hiding this comment.
Claim an unobserved receipt before labeling it reused
If the initiating process exits after the daemon persists the nonce-bound row but before waitForLaunchReceipt claims it, the next axi run finds the row through its initial lookup and emits this handler's unconditionally reused receipt even though launch_receipt_claimed_at is still NULL. Thus the first caller that actually observes the receipt can receive reused, breaking the documented first-observation disposition and strict smoke-test contract; the retry lookup should atomically claim the receipt or derive the disposition from the claim state.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Temporary fork mirror of upstream-first kunchenguid/no-mistakes#895 for issue #804.
Carries only the atomic opaque-intent proof patch. Do not merge until captain approval. Retire the fork-only binary path after an upstream release passes the documented strict receipt smoke test.